/*
 * Copyright (C) 2010-2010 MaoJian Wu
 *
 * Author:
 *	MaoJian Wu
 *
 * Source:
 *	
 *
 * This file is a part of zfspear library.
 *
 *
 */

#ifndef JID_H
#define JID_H
#include <QString>
class Jid
{
public:
    Jid(const QString& domain = "");
    Jid(const QString& node,const QString& domain);
    Jid(const QString& node,const QString& domain,const QString& resource);
    Jid(const Jid& other);
    void SetNode(const QString& node);
    QString Node() const;
    void SetDomain(const QString& domain);
    QString Domain() const;
    void SetResource(const QString& resource);
    QString Resource() const;
    QString ToString() const;
    bool FromString(const QString& jidString);
    QString BareId() const;
    bool operator==(const Jid& other);
    bool operator!=(const Jid& other);

private:
    QString node_;
    QString domain_;
    QString resource_;

};

#endif // JID_H
